package service.search;

import bean.search.KeySearch;
import client.MnueClient;
import dao.search.KeySearchDao;
import service.menu.PersonMenuService;

import java.sql.SQLException;
import java.text.ParseException;
import java.util.List;
import java.util.Scanner;

public class KeySearchService {
    public void show() throws SQLException, ParseException {
        KeySearchDao ksd = new KeySearchDao();
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入钥匙领取的状态：");
        String iKey = scanner.next();
        List<KeySearch> listKeySearch =ksd.keySearch(iKey);
        for(KeySearch keySearch : listKeySearch){
            System.out.println(keySearch);
        }
        System.out.println("输入0返回上一层菜单");
        int a = scanner.nextInt();
        if(0 == a){PersonMenuService pms = new PersonMenuService();
            pms.messageSys();
        }
    }

}
